Skip to content

Keep GitHub package tags with no release date - #204

Open
codewithfourtix wants to merge 2 commits into
aboutcode-org:masterfrom
codewithfourtix:fix-github-tags-missing-date
Open

Keep GitHub package tags with no release date#204
codewithfourtix wants to merge 2 commits into
aboutcode-org:masterfrom
codewithfourtix:fix-github-tags-missing-date

Conversation

@codewithfourtix

Copy link
Copy Markdown

The GitHub tag helper can return None for an unavailable or unparseable commit date, but package conversion unconditionally calls strftime(). Preserve the package with an unset release date instead of crashing.

Adds a regression test with a tag whose date is unavailable.

Signed-off-by: Ali Zulfiqar <codewithfourtix@gmail.com>
Copilot AI lite review requested due to automatic review settings September 5, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new test file should match the repository’s standard license/copyright header convention to keep test modules consistent.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR prevents GitHub tag-to-package conversion from crashing when a tag’s commit date is unavailable/unparseable by allowing release_date to remain unset (None) instead of unconditionally calling strftime().

Changes:

  • Handle missing tag commit dates by setting release_date to None rather than calling strftime() on a None value.
  • Add a regression test covering a GitHub tag with an unavailable release date.
File summaries
File Description
tests/test_github_missing_date.py Adds regression coverage for a tag with a missing commit date.
src/fetchcode/package_util.py Avoids strftime() crash by allowing release_date to be None.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/test_github_missing_date.py
Signed-off-by: Ali Zulfiqar <codewithfourtix@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants